﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PetkaWebDav.Server.Framework.Enums
{
    /// <summary>
    /// WebDav HttpMethods
    /// </summary>
    [FlagsAttribute]
    public enum HttpMethods : int
    {
        /// <summary>
        /// No supported methods
        /// </summary>
        None = 0,

        /// <summary>
        /// Supports OPTIONS Method
        /// </summary>
        Options = 1,

        /// <summary>
        /// Supports GET Method
        /// </summary>
        Get = 2,

        /// <summary>
        /// Supports HEAD Method
        /// </summary>
        Head = 4,

        /// <summary>
        /// Supports DELETE Method
        /// </summary>
        Delete = 8,

        /// <summary>
        /// Supports PUT Method
        /// </summary>
        Put = 16,

        /// <summary>
        /// Supports COPY Method
        /// </summary>
        Copy = 32,

        /// <summary>
        /// Supports MOVE Method
        /// </summary>
        Move = 64,

        /// <summary>
        /// Supports MKCOL Method
        /// </summary>
        MKCol = 128,

        /// <summary>
        /// Supports PROPFIND Method
        /// </summary>
        PropFind = 256,

        /// <summary>
        /// Supports PROPPATCH Method
        /// </summary>
        PropPatch = 512,

        /// <summary>
        /// Supports LOCK Method
        /// </summary>
        Lock = 1024,

        /// <summary>
        /// Supports UNLOCK Method
        /// </summary>
        Unlock = 2048,

        /// <summary>
        /// Supports VERSION-CONTROL Method
        /// </summary>
        VersionControl = 4096,

        /// <summary>
        /// Supports REPORT Method
        /// </summary>
        Report = 8192,

        /// <summary>
        /// Supports All Methods
        /// </summary>
        All = HttpMethods.Copy | HttpMethods.Delete | HttpMethods.Get | HttpMethods.Head | HttpMethods.Lock |
            HttpMethods.MKCol | HttpMethods.Move | HttpMethods.Options | HttpMethods.PropFind | HttpMethods.PropPatch | HttpMethods.Put |
            HttpMethods.Report | HttpMethods.Unlock | HttpMethods.VersionControl
    }
}
